t = codesters.Teacher()
try:
tval1_line = t.find_function('choice')[0][0]
tval1 = t.get_indent_at_line(tval1_line)
tval2 = t.find_function('choice')[0][1]
tval3 = t.get_parameters_for_function('choice')[0][0]
except:
tval1_line = "DNE"
tval1 = "DNE"
tval2 = "DNE"
tval3 = "DNE"
t1 = TestObjective()
t1.add_success(tval1 == 4 and 'rand_pw' in tval2 and tval3 is 'all_pws', "Great job!")
t1.add_failure(tval1 == "DNE", "Did you add a Random Choice command to your Interval Event?")
t1.add_failure('rand_pw' not in tval2, "Did you change the name of your Random Choice variable to rand_pw?")
t1.add_failure('all_pws' not in tval3, "Did you change the name of the list in your choice command to all_pws?")
t1.add_failure(tval1 < 4, "Make sure your Random Choice command is indented 4 spaces inside your Interval Event!")
tester = TestManager()
tester.add_test_list([t1])
tester.run_tests()
tester.display_first_feedback()
Are you already running a Codesters project in another tab or window?
Micro:bit can only connect to one web page at a time.
Try stopping other Codesters projects or closing
other tabs or windows that may be using your Micro:bit.
If that doesn't fix the problem try disconnecting your Micro:bit,
reloading this page, and reconnecting your Micro:bit.